﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.SessionState;

namespace ExtenDev.Web.Extensions
{
    class SessionCapableHandler : IHttpHandler, IRequiresSessionState
    {
        private readonly IHttpHandler _originalHandler;

        public SessionCapableHandler(IHttpHandler originalHandler)
        {
            _originalHandler = originalHandler;
        }

        public virtual void ProcessRequest(HttpContext context)
        {
            _originalHandler.ProcessRequest(context);
        }

        public bool IsReusable
        {
            get { return false; }
        }

        public IHttpHandler OriginalHandler
        {
            get
            {
                return _originalHandler;
            }
        }
    }
}
